package cn.wd.qo;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Collections;
import java.util.List;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class PageResult<T> {
    private Integer currentPage;
    private Integer pageSize;
    private Long total;
    private List<T> list;

    public static <T> PageResult<T> empty(Integer currentPage, Integer pageSize) {
        return new PageResult<>(currentPage, pageSize, 0L, Collections.emptyList());
    }
}
